

theme_bw_finegrid <- function(base_size = 12, base_family = "") {
  # Starts with theme_grey and then modify some parts
  theme_grey(base_size = base_size, base_family = base_family) %+replace%
    theme(
      axis.text         = element_text(size = rel(0.8)),
      axis.ticks        = element_line(colour = "black"),
      legend.key        = element_rect(colour = "grey80"),
      panel.background  = element_rect(fill = "white", colour = NA),
      panel.border      = element_rect(fill = NA, colour = "grey50"),
      panel.grid.major.x =  element_line(colour = "grey", size = 0.5,linetype="dotted"),
      panel.grid.minor.x =  element_line(colour = "grey", size = 0.5,linetype="dotted"),
      panel.grid.major.y =  element_line(colour = "grey", size = 0.5,linetype="dotted"),
      panel.grid.minor.y =  element_line(colour = "grey", size = 0.5,linetype="dotted"),
      panel.margin =      unit(0.1, "lines"),
      strip.background  = element_rect(fill = "grey80", colour = "grey50"),
      strip.background  = element_rect(fill = "grey80", colour = "grey50")
    )
}



theme_bw_finegrid_special <- function(base_size = 12, base_family = "") {
  # Starts with theme_grey and then modify some parts
  theme_grey(base_size = base_size, base_family = base_family) %+replace%
    theme(
      axis.text         = element_text(size = rel(0.8)),
      axis.ticks        = element_line(colour = "black"),
      legend.key        = element_rect(colour = "grey80"),
      panel.background  = element_rect(fill = "white", colour = NA),
      panel.border      = element_rect(fill = NA, colour = "grey50"),
      panel.grid.major.x =  element_line(colour = "grey", size = 0.5,linetype="solid"),
      panel.grid.minor.x =  element_line(colour = "grey", size = 0.5,linetype="solid"),
      panel.grid.major.y =  element_line(colour = "grey", size = 0.5,linetype="dotted"),
      panel.grid.minor.y =  element_line(colour = "grey", size = 0.5,linetype="dotted"),
      panel.margin =      unit(0.1, "lines"),
      strip.background  = element_rect(fill = "grey80", colour = "grey50"),
      strip.background  = element_rect(fill = "grey80", colour = "grey50")
    )
}

